Skip to content

fix warnings and update cmake#13

Open
sergio-eld wants to merge 9 commits intomaddouri:masterfrom
sergio-eld:master
Open

fix warnings and update cmake#13
sergio-eld wants to merge 9 commits intomaddouri:masterfrom
sergio-eld:master

Conversation

@sergio-eld
Copy link

  1. added a workaround on function pointer casting, since direct usage of reinterpret_cast results in a warning. That prevents the usage of a package in the project that treats warnings as errors.
  2. added CLEAN_BUILD option defaulted to OFF. If ON, the project will compile with all the warnings and treat them as errors. Works for MSVC and GNU.
  3. modified tests:
    • renamed test target from all_tests to loader, since it is ambiguous and ALL_TESTS is used by cmake
    • moved enable_testing to the root CMakeLists.txt as it is required by documentation.
    • added option BUILD_TESTS defaulted to ON
    • added test in cmake for EXCLUDE_FROM_ALL property on directory. If tests are enabled, parent project's test will fail because it won't build executables for testing. If the property is detected to be TRUE, no tests will be built.
    • added check for input arguments (checking argc) in loader test. Also added try-catch block and return -1 if test fails.
    • modified test to accept 1 argument as an absolute path to shared library. Since the test is now invoked with $<TARGET_FILE:shared> which provides an absolute path to the binary, the test works without errors for shared library name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant